3.1.98 \(\int \frac {a+b x^2}{\sqrt {c+d x^2} (e+f x^2)^2} \, dx\) [98]

Optimal. Leaf size=113 \[ \frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \tanh ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {e} \sqrt {c+d x^2}}\right )}{2 e^{3/2} (d e-c f)^{3/2}} \]

[Out]

-1/2*(a*c*f-2*a*d*e+b*c*e)*arctanh(x*(-c*f+d*e)^(1/2)/e^(1/2)/(d*x^2+c)^(1/2))/e^(3/2)/(-c*f+d*e)^(3/2)+1/2*(-
a*f+b*e)*x*(d*x^2+c)^(1/2)/e/(-c*f+d*e)/(f*x^2+e)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {541, 12, 385, 214} \begin {gather*} \frac {x \sqrt {c+d x^2} (b e-a f)}{2 e \left (e+f x^2\right ) (d e-c f)}-\frac {(a c f-2 a d e+b c e) \tanh ^{-1}\left (\frac {x \sqrt {d e-c f}}{\sqrt {e} \sqrt {c+d x^2}}\right )}{2 e^{3/2} (d e-c f)^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)/(Sqrt[c + d*x^2]*(e + f*x^2)^2),x]

[Out]

((b*e - a*f)*x*Sqrt[c + d*x^2])/(2*e*(d*e - c*f)*(e + f*x^2)) - ((b*c*e - 2*a*d*e + a*c*f)*ArcTanh[(Sqrt[d*e -
 c*f]*x)/(Sqrt[e]*Sqrt[c + d*x^2])])/(2*e^(3/2)*(d*e - c*f)^(3/2))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rubi steps

\begin {align*} \int \frac {a+b x^2}{\sqrt {c+d x^2} \left (e+f x^2\right )^2} \, dx &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}+\frac {\int \frac {-b c e+2 a d e-a c f}{\sqrt {c+d x^2} \left (e+f x^2\right )} \, dx}{2 e (d e-c f)}\\ &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \int \frac {1}{\sqrt {c+d x^2} \left (e+f x^2\right )} \, dx}{2 e (d e-c f)}\\ &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \text {Subst}\left (\int \frac {1}{e-(d e-c f) x^2} \, dx,x,\frac {x}{\sqrt {c+d x^2}}\right )}{2 e (d e-c f)}\\ &=\frac {(b e-a f) x \sqrt {c+d x^2}}{2 e (d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \tanh ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {e} \sqrt {c+d x^2}}\right )}{2 e^{3/2} (d e-c f)^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.55, size = 131, normalized size = 1.16 \begin {gather*} \frac {\frac {\sqrt {e} (b e-a f) x \sqrt {c+d x^2}}{(d e-c f) \left (e+f x^2\right )}-\frac {(b c e-2 a d e+a c f) \tan ^{-1}\left (\frac {-f x \sqrt {c+d x^2}+\sqrt {d} \left (e+f x^2\right )}{\sqrt {e} \sqrt {-d e+c f}}\right )}{(-d e+c f)^{3/2}}}{2 e^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)/(Sqrt[c + d*x^2]*(e + f*x^2)^2),x]

[Out]

((Sqrt[e]*(b*e - a*f)*x*Sqrt[c + d*x^2])/((d*e - c*f)*(e + f*x^2)) - ((b*c*e - 2*a*d*e + a*c*f)*ArcTan[(-(f*x*
Sqrt[c + d*x^2]) + Sqrt[d]*(e + f*x^2))/(Sqrt[e]*Sqrt[-(d*e) + c*f])])/(-(d*e) + c*f)^(3/2))/(2*e^(3/2))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(847\) vs. \(2(97)=194\).
time = 0.12, size = 848, normalized size = 7.50

method result size
default \(\frac {\left (-a f +b e \right ) \left (-\frac {f \sqrt {\left (x -\frac {\sqrt {-f e}}{f}\right )^{2} d +\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{\left (c f -d e \right ) \left (x -\frac {\sqrt {-f e}}{f}\right )}+\frac {d \sqrt {-f e}\, \ln \left (\frac {\frac {2 c f -2 d e}{f}+\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x -\frac {\sqrt {-f e}}{f}\right )^{2} d +\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x -\frac {\sqrt {-f e}}{f}}\right )}{\left (c f -d e \right ) \sqrt {\frac {c f -d e}{f}}}\right )}{4 e \,f^{2}}-\frac {\left (a f +b e \right ) \ln \left (\frac {\frac {2 c f -2 d e}{f}+\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x -\frac {\sqrt {-f e}}{f}\right )^{2} d +\frac {2 d \sqrt {-f e}\, \left (x -\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x -\frac {\sqrt {-f e}}{f}}\right )}{4 e \sqrt {-f e}\, f \sqrt {\frac {c f -d e}{f}}}-\frac {\left (-a f -b e \right ) \ln \left (\frac {\frac {2 c f -2 d e}{f}-\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x +\frac {\sqrt {-f e}}{f}\right )^{2} d -\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x +\frac {\sqrt {-f e}}{f}}\right )}{4 e \sqrt {-f e}\, f \sqrt {\frac {c f -d e}{f}}}+\frac {\left (-a f +b e \right ) \left (-\frac {f \sqrt {\left (x +\frac {\sqrt {-f e}}{f}\right )^{2} d -\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{\left (c f -d e \right ) \left (x +\frac {\sqrt {-f e}}{f}\right )}-\frac {d \sqrt {-f e}\, \ln \left (\frac {\frac {2 c f -2 d e}{f}-\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+2 \sqrt {\frac {c f -d e}{f}}\, \sqrt {\left (x +\frac {\sqrt {-f e}}{f}\right )^{2} d -\frac {2 d \sqrt {-f e}\, \left (x +\frac {\sqrt {-f e}}{f}\right )}{f}+\frac {c f -d e}{f}}}{x +\frac {\sqrt {-f e}}{f}}\right )}{\left (c f -d e \right ) \sqrt {\frac {c f -d e}{f}}}\right )}{4 e \,f^{2}}\) \(848\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)/(f*x^2+e)^2/(d*x^2+c)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/4*(-a*f+b*e)/e/f^2*(-1/(c*f-d*e)*f/(x-(-f*e)^(1/2)/f)*((x-(-f*e)^(1/2)/f)^2*d+2*d*(-f*e)^(1/2)/f*(x-(-f*e)^(
1/2)/f)+(c*f-d*e)/f)^(1/2)+d*(-f*e)^(1/2)/(c*f-d*e)/((c*f-d*e)/f)^(1/2)*ln((2*(c*f-d*e)/f+2*d*(-f*e)^(1/2)/f*(
x-(-f*e)^(1/2)/f)+2*((c*f-d*e)/f)^(1/2)*((x-(-f*e)^(1/2)/f)^2*d+2*d*(-f*e)^(1/2)/f*(x-(-f*e)^(1/2)/f)+(c*f-d*e
)/f)^(1/2))/(x-(-f*e)^(1/2)/f)))-1/4*(a*f+b*e)/e/(-f*e)^(1/2)/f/((c*f-d*e)/f)^(1/2)*ln((2*(c*f-d*e)/f+2*d*(-f*
e)^(1/2)/f*(x-(-f*e)^(1/2)/f)+2*((c*f-d*e)/f)^(1/2)*((x-(-f*e)^(1/2)/f)^2*d+2*d*(-f*e)^(1/2)/f*(x-(-f*e)^(1/2)
/f)+(c*f-d*e)/f)^(1/2))/(x-(-f*e)^(1/2)/f))-1/4*(-a*f-b*e)/e/(-f*e)^(1/2)/f/((c*f-d*e)/f)^(1/2)*ln((2*(c*f-d*e
)/f-2*d*(-f*e)^(1/2)/f*(x+(-f*e)^(1/2)/f)+2*((c*f-d*e)/f)^(1/2)*((x+(-f*e)^(1/2)/f)^2*d-2*d*(-f*e)^(1/2)/f*(x+
(-f*e)^(1/2)/f)+(c*f-d*e)/f)^(1/2))/(x+(-f*e)^(1/2)/f))+1/4*(-a*f+b*e)/e/f^2*(-1/(c*f-d*e)*f/(x+(-f*e)^(1/2)/f
)*((x+(-f*e)^(1/2)/f)^2*d-2*d*(-f*e)^(1/2)/f*(x+(-f*e)^(1/2)/f)+(c*f-d*e)/f)^(1/2)-d*(-f*e)^(1/2)/(c*f-d*e)/((
c*f-d*e)/f)^(1/2)*ln((2*(c*f-d*e)/f-2*d*(-f*e)^(1/2)/f*(x+(-f*e)^(1/2)/f)+2*((c*f-d*e)/f)^(1/2)*((x+(-f*e)^(1/
2)/f)^2*d-2*d*(-f*e)^(1/2)/f*(x+(-f*e)^(1/2)/f)+(c*f-d*e)/f)^(1/2))/(x+(-f*e)^(1/2)/f)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(f*x^2+e)^2/(d*x^2+c)^(1/2),x, algorithm="maxima")

[Out]

integrate((b*x^2 + a)/(sqrt(d*x^2 + c)*(f*x^2 + e)^2), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (101) = 202\).
time = 3.92, size = 523, normalized size = 4.63 \begin {gather*} \left [-\frac {{\left (a c f^{2} x^{2} + {\left (b c - 2 \, a d\right )} e^{2} + {\left ({\left (b c - 2 \, a d\right )} f x^{2} + a c f\right )} e\right )} \sqrt {-c f e + d e^{2}} \log \left (\frac {c^{2} f^{2} x^{4} - 4 \, {\left (c f x^{3} - {\left (2 \, d x^{3} + c x\right )} e\right )} \sqrt {d x^{2} + c} \sqrt {-c f e + d e^{2}} + {\left (8 \, d^{2} x^{4} + 8 \, c d x^{2} + c^{2}\right )} e^{2} - 2 \, {\left (4 \, c d f x^{4} + 3 \, c^{2} f x^{2}\right )} e}{f^{2} x^{4} + 2 \, f x^{2} e + e^{2}}\right ) - 4 \, {\left (a c f^{2} x e + b d x e^{3} - {\left (b c + a d\right )} f x e^{2}\right )} \sqrt {d x^{2} + c}}{8 \, {\left (c^{2} f^{3} x^{2} e^{2} + d^{2} e^{5} + {\left (d^{2} f x^{2} - 2 \, c d f\right )} e^{4} - {\left (2 \, c d f^{2} x^{2} - c^{2} f^{2}\right )} e^{3}\right )}}, \frac {{\left (a c f^{2} x^{2} + {\left (b c - 2 \, a d\right )} e^{2} + {\left ({\left (b c - 2 \, a d\right )} f x^{2} + a c f\right )} e\right )} \sqrt {c f e - d e^{2}} \arctan \left (-\frac {{\left (c f x^{2} - {\left (2 \, d x^{2} + c\right )} e\right )} \sqrt {d x^{2} + c} \sqrt {c f e - d e^{2}}}{2 \, {\left ({\left (d^{2} x^{3} + c d x\right )} e^{2} - {\left (c d f x^{3} + c^{2} f x\right )} e\right )}}\right ) + 2 \, {\left (a c f^{2} x e + b d x e^{3} - {\left (b c + a d\right )} f x e^{2}\right )} \sqrt {d x^{2} + c}}{4 \, {\left (c^{2} f^{3} x^{2} e^{2} + d^{2} e^{5} + {\left (d^{2} f x^{2} - 2 \, c d f\right )} e^{4} - {\left (2 \, c d f^{2} x^{2} - c^{2} f^{2}\right )} e^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(f*x^2+e)^2/(d*x^2+c)^(1/2),x, algorithm="fricas")

[Out]

[-1/8*((a*c*f^2*x^2 + (b*c - 2*a*d)*e^2 + ((b*c - 2*a*d)*f*x^2 + a*c*f)*e)*sqrt(-c*f*e + d*e^2)*log((c^2*f^2*x
^4 - 4*(c*f*x^3 - (2*d*x^3 + c*x)*e)*sqrt(d*x^2 + c)*sqrt(-c*f*e + d*e^2) + (8*d^2*x^4 + 8*c*d*x^2 + c^2)*e^2
- 2*(4*c*d*f*x^4 + 3*c^2*f*x^2)*e)/(f^2*x^4 + 2*f*x^2*e + e^2)) - 4*(a*c*f^2*x*e + b*d*x*e^3 - (b*c + a*d)*f*x
*e^2)*sqrt(d*x^2 + c))/(c^2*f^3*x^2*e^2 + d^2*e^5 + (d^2*f*x^2 - 2*c*d*f)*e^4 - (2*c*d*f^2*x^2 - c^2*f^2)*e^3)
, 1/4*((a*c*f^2*x^2 + (b*c - 2*a*d)*e^2 + ((b*c - 2*a*d)*f*x^2 + a*c*f)*e)*sqrt(c*f*e - d*e^2)*arctan(-1/2*(c*
f*x^2 - (2*d*x^2 + c)*e)*sqrt(d*x^2 + c)*sqrt(c*f*e - d*e^2)/((d^2*x^3 + c*d*x)*e^2 - (c*d*f*x^3 + c^2*f*x)*e)
) + 2*(a*c*f^2*x*e + b*d*x*e^3 - (b*c + a*d)*f*x*e^2)*sqrt(d*x^2 + c))/(c^2*f^3*x^2*e^2 + d^2*e^5 + (d^2*f*x^2
 - 2*c*d*f)*e^4 - (2*c*d*f^2*x^2 - c^2*f^2)*e^3)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b x^{2}}{\sqrt {c + d x^{2}} \left (e + f x^{2}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)/(f*x**2+e)**2/(d*x**2+c)**(1/2),x)

[Out]

Integral((a + b*x**2)/(sqrt(c + d*x**2)*(e + f*x**2)**2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 336 vs. \(2 (101) = 202\).
time = 2.32, size = 336, normalized size = 2.97 \begin {gather*} -\frac {{\left (a c \sqrt {d} f + b c \sqrt {d} e - 2 \, a d^{\frac {3}{2}} e\right )} \arctan \left (\frac {{\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} f - c f + 2 \, d e}{2 \, \sqrt {c d f e - d^{2} e^{2}}}\right )}{2 \, \sqrt {c d f e - d^{2} e^{2}} {\left (c f e - d e^{2}\right )}} - \frac {{\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} a c \sqrt {d} f^{2} - {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} b c \sqrt {d} f e - 2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} a d^{\frac {3}{2}} f e - a c^{2} \sqrt {d} f^{2} + 2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} b d^{\frac {3}{2}} e^{2} + b c^{2} \sqrt {d} f e}{{\left ({\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{4} f - 2 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} c f + 4 \, {\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} d e + c^{2} f\right )} {\left (c f^{2} e - d f e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(f*x^2+e)^2/(d*x^2+c)^(1/2),x, algorithm="giac")

[Out]

-1/2*(a*c*sqrt(d)*f + b*c*sqrt(d)*e - 2*a*d^(3/2)*e)*arctan(1/2*((sqrt(d)*x - sqrt(d*x^2 + c))^2*f - c*f + 2*d
*e)/sqrt(c*d*f*e - d^2*e^2))/(sqrt(c*d*f*e - d^2*e^2)*(c*f*e - d*e^2)) - ((sqrt(d)*x - sqrt(d*x^2 + c))^2*a*c*
sqrt(d)*f^2 - (sqrt(d)*x - sqrt(d*x^2 + c))^2*b*c*sqrt(d)*f*e - 2*(sqrt(d)*x - sqrt(d*x^2 + c))^2*a*d^(3/2)*f*
e - a*c^2*sqrt(d)*f^2 + 2*(sqrt(d)*x - sqrt(d*x^2 + c))^2*b*d^(3/2)*e^2 + b*c^2*sqrt(d)*f*e)/(((sqrt(d)*x - sq
rt(d*x^2 + c))^4*f - 2*(sqrt(d)*x - sqrt(d*x^2 + c))^2*c*f + 4*(sqrt(d)*x - sqrt(d*x^2 + c))^2*d*e + c^2*f)*(c
*f^2*e - d*f*e^2))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {b\,x^2+a}{\sqrt {d\,x^2+c}\,{\left (f\,x^2+e\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)/((c + d*x^2)^(1/2)*(e + f*x^2)^2),x)

[Out]

int((a + b*x^2)/((c + d*x^2)^(1/2)*(e + f*x^2)^2), x)

________________________________________________________________________________________